
Page({
  data: {
    playforminfo: {},
    userId: '',
  },
  async onShow() {
    my.setNavigationBar({
      title: '客服',
      backgroundColor: '#0384FF'
    })

    const app = getApp()

    this.setData({ playforminfo: app.globalData.playforminfo })

    const userInfo = await app.silenceLogin()

    if (userInfo) {
      this.setData({ userId: userInfo.userId })
    }
  },
  makePhoneCall() {
    console.log('this.data.playforminfo.customerServicePhone', this.data.playforminfo.customerServicePhone)
    my.makePhoneCall({ number: this.data.playforminfo.customerServicePhone });
  }
});
